import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Icons from 'unplugin-icons/vite'
const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}

export default defineConfig({
  base: './',
  plugins: [vue(), Icons({ autoInstall: true })],
  server: {
    port: 4333,
    host: '0.0.0.0',
  },
  resolve: {
    alias: {
      '@': resolve('src'),
    },
  },
  css: {
    preprocessorOptions: {
      scss: {
        silenceDeprecations: ['legacy-js-api'],
      },
    },
  },
  define: {
    __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false',
  },
})
